package com.situ.day7.homework.car;

public class SubCar extends Car{
	private int price;
	private int speed;
	
	public SubCar() {
		super();
	}

	public SubCar(String mark, int price, int speed) {
		super(mark);
		this.price = price;
		this.speed = speed;
	}

	public void speedChange(int newSpeed) {
		this.speed = newSpeed;
	}
	
	@Override
	public void drive() {
		System.out.println("本车正在驾驶");
	}
	
	public void show() {
		System.out.println("本车的品牌是" + getMark());
		System.out.println(getMark() + "的价格是" + price);
		System.out.println(getMark() + "车的原来速度是" + speed);
		drive();
		speedChange(120);
		System.out.println(getMark() + "车现在速度是" + speed);
	}
	

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	
	
	
}
